package studyguide.ch12;

import java.io.PrintStream;

import javax.microedition.rms.RecordListener;
import javax.microedition.rms.RecordStore;

public class RecordStoreListener implements RecordListener {

	private final PrintStream out;
	
	public RecordStoreListener(PrintStream out) {
		this.out = out;
	}
	
	public void recordAdded(RecordStore recordStore, int recordId) {
		out.println("Record added:" + recordId);
	}

	public void recordChanged(RecordStore recordStore, int recordId) {
		out.println("Record changed:" + recordId);
	}

	public void recordDeleted(RecordStore recordStore, int recordId) {
		out.println("Record removed:" + recordId);
	}

}
